<extend name="Public/baseConf"/>  
<block name="breadcrumb"> 
	<div class="row wrapper border-bottom white-bg page-heading">
	    <div class="col-lg-4">
	        <h2>网站帮助</h2>
	        <ol class="breadcrumb">
	            <li><a href="{:U('index/index')}">首页</a></li>
	            <li class="active">
	                <strong><if condition="$data eq null">新增网站帮助<else/>编辑网站帮助({$data['name']})</if></strong>
	            </li>
	        </ol>
	    </div>
	    <div class="col-lg-6"></div>
	    <div class="col-lg-2">
            <div class="title-action">
           		<button class="btn btn-primary ajax-post" type="submit" target-form="form">
           		<i class="fa fa-pencil align-top"></i>确定
           		</button> 
            </div>
        </div>
	</div> 
</block>
<block name="body">
	<div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
	        <div class="col-lg-12">
	            <div class="ibox float-e-margins">
	                <div class="ibox-title">
	                    <h5><if condition="$data eq null">新增网站帮助<else/>编辑网站帮助({$data['name']})</if></h5>
	                    <div class="ibox-tools">
	                        <a class="collapse-link">
	                            <i class="fa fa-chevron-up"></i>
	                        </a>
	                    </div>
	                </div>
	                <div class="ibox-content">
		                <form action="{:U('save')}" method="post" class="form">
		                    <div class="row">
		                    	<input type="hidden" name="id" value="{$data['id']}"/>
		                        <div class="col-sm-12 b-r">
	                                <div class="form-group">
	                                	<label>问题</label> 
	                                	<input type="text" id="questions" name="questions" value="{$data['questions']}" placeholder="必填项" class="form-control">
	                                </div>
	                                <div class="form-group"><label>类型</label> 
										<select id="types" name="types" class="form-control">
											<option value="一般问题" <eq name="data['types']" value="一般问题">selected</eq>>一般问题</option>
											<option value="其它问题" <eq name="data['types']" value="其它问题">selected</eq>>其它问题</option>
										</select>
									</div>
	                                <div class="form-group">
		                                <label>答案</label> 
		                                <textarea id="answers"  rows="7" name="answers" placeholder="必填项" class="form-control">{$data['answers']}</textarea>
		                            </div>
									<div class="form-group">
		                                <label>备注</label> 
		                                <textarea id="comments" name="comments" class="form-control">{$data['comments']}</textarea>
		                            </div>
		                        </div>
		                    </div>
	                    </form>
	                </div>
	            </div>
	        </div>
        </div>
        <div class="row">
	        <div class="col-lg-12">
	        	<div class="ibox float-e-margins">
	                <div class="ibox-title">
	                    <h5>图片列表</h5>
	                    <div class="ibox-tools">
	                        <a class="collapse-link">
	                            <i class="fa fa-chevron-up"></i>
	                        </a>
	                    </div>
	                </div>
	                <div class="ibox-content">
	                	<input type="text" class="form-control input-sm m-b-xs" id="filter" placeholder="快速检索">
	                    <table class="footable table table-stripped" data-page-size="8" data-filter=#filter>
	                        <thead>
	                        <tr>
								<th class="row-selected row-selected">
								<label><input type="checkbox" class="check-all" /><span class="lbl"></span></label></th>
			                    <th class="center">ID</th>
			                    <th class="center">问题</th>
			                    <th class="center">类别</th>
			                    <th class="center">备注</th>
			                    <th class="center">操作</th>
	                        </tr>
	                        </thead>
	                        <tbody>
	                        <tr class="gradeX">
								<notempty name="_list">
								<volist name="_list" id="vo">
								<tr>
						            <td class="center">
										<label>
											<input type="checkbox" class="ids row-selected" name="id[]" value="{$vo.id}"/>
											<span class="lbl"></span>
										</label>
									</td>
									<td>{$vo.id}</td>
			                        <td>{$vo.questions}</td>
			                        <td>{$vo.types}</td>
			                        <td>{$vo.comments}</td>
			                        <td class="center">
			                        	<a title="编辑" href="{:U('edit?id='.$vo['id'])}"><i class="text-navy fa fa-pencil bigger-130"></i></a>
						                <a title="删除" class="ajax-get" href="{:U('delete?id='.$vo['id'])}"><i class="text-danger fa fa-trash-o bigger-130"></i></a>
			                        </td>
								</tr>
								</volist>
								<else/> 
								<td colspan="7" class="text-center"> aOh! 暂时还没有内容! </td>
								</notempty>
	                        </tr>
	                        </tbody>
	                        <tfoot>
	                        <tr>
	                            <td colspan="7">
	                                <ul class="pagination pull-right"></ul>
	                            </td>
	                        </tr>
	                        </tfoot>
	                    </table>
	                </div>
	            </div>
	        </div>
        </div>
    </div>
	<!-- 分页 -->
    <div class="page">
        {$_page}
    </div>  
</block>  
<block name="script">
	<!-- FooTable -->
    <script src="__INSPINIA__/js/plugins/footable/footable.all.min.js"></script>
	<script>
	   $('.footable').footable();
    </script>	
</block>
